﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_Index.aspx.cs" Inherits="TRPOP.CMS.Web.Admin.Admin_Index" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>
        <%=base.m_strBaseAdminPageName%></title>
    <script src="../js/jquery.js" type="text/javascript"></script>
    <script src="../js/utils.js" type="text/javascript"></script>
    <script src="../js/cookie.js" type="text/javascript"></script>
    <script src="js/common_win_function.js" type="text/javascript"></script>
    <%-- 控制窗口的js代码 --%>
    <script src="js/Admin_Index_doing.js" type="text/javascript"></script>
    <%-- 打开系统菜单 的js代码 --%>
    <script src="js/Admin_Index.js" type="text/javascript"></script>
    <%-- 执行任务 的js代码 --%>
    <script src="js/common_win_drag.js" type="text/javascript"></script>
    <%-- 树状栏左右移动 --%>
    <script src="js/admin_task_runMutiThread.js" type="text/javascript"></script>
</head>
<body scroll="no">
    <table id="bodypanel" cellpadding="0" cellspacing="0" width="100%" border="0">
        <tr>
            <td colspan="3" width="100%">
                <div id="msviMasthead" xmlns:utility="http://www.microsoft.com/MSCOM/VisualIdentity/Utility">
                    <!-- 头部Logo begin -->
                    <table cellpadding="0" class="AdminIndex_TopBG" id="top_table" cellspacing="0" width="100%"
                        border="0" style="height: 65px;">
                        <tr valign="top">
                            <td id="msviBrandBanner">
                                <a>
                                    <img src="../App_Themes/<%=TRPOP.CMS.Model.SystemInfoHelper.getSystemInfo().CMSThemes%>/images/logo.jpg"
                                        alt="<%=base.m_strBaseAdminPageName%>" border="0" />
                                </a>
                            </td>
                        </tr>
                    </table>
                    <!-- 头部Logo end -->
                    <!-- 头部 menu begin -->
                    <div class="MainMenu">
                        <table cellpadding="0" cellspacing="0" width="100%" height="19" border="0">
                            <tr>
                                <td id="leftopen" class="lt0" nowrap="nowrap">
                                    <a href="javascript:void(0);" onclick="showleft();">打开左栏</a>
                                </td>
                                <!--加载menu begin-->
                                <% string strTopMenuTd = "<td class=\"lt0\" nowrap=\"nowrap\" onclick=\"{0}\" menu=\"{1}\">{2}</td><td></td>";
                                   StringBuilder strbTopMenu = new StringBuilder();
                                   System.Data.DataTable oTBTopMenu = TRPOP.CMS.Model.SYSConfig.GetDataSource("TopMenu", "//items");
                                   foreach (System.Data.DataRow TempRow in oTBTopMenu.Rows)
                                   {
                                       strbTopMenu.Append(string.Format(strTopMenuTd, new object[] { TempRow["onclick"], TempRow["menu"], TempRow["MenuName"] }));
                                   } %>
                                <%=strbTopMenu.ToString()%>
                                <!--加载menu end-->
                                <td width="100%" align="right">
                                    <span class="ltsep">欢迎你:<%=base.mUserBaseInfo.Name%>/管理员&nbsp;&nbsp;| </span>
                                </td>
                                <td class="lt0" nowrap="nowrap" onclick="doing('logout');">
                                    退出系统
                                </td>
                            </tr>
                        </table>
                    </div>
                    <!-- 头部 menu end -->
                </div>
            </td>
        </tr>
        <tr>
            <!-- 左侧树形导航 begin -->
            <td id="td_left" valign="top">
                <div id="lefttop">
                    <span title="刷新" id="menutip" style="font-weight: bold;"></span><a href="javascript:void(0);"
                        onclick="hideleft();" title="关闭">
                        <img src="../App_Themes/<%=TRPOP.CMS.Model.SystemInfoHelper.getSystemInfo().CMSThemes%>/images/tocHide.gif"
                            alt="隐藏" width="10" height="13"></a>
                </div>
                <div>
                    <iframe id="leftwin" name="leftwin" scrolling="auto" frameborder="0" width="100%"
                        src="lefttree.aspx"></iframe>
                </div>
            </td>
            <!-- 左侧树形导航 end -->
            <!-- 树形导航 和 主页面 之间的操作条 begin -->
            <td id="splitBar">
                &nbsp;
            </td>
            <!-- 树形导航 和 主页面 之间的操作条 end -->
            <!-- main 页面 begin -->
            <td id="td_main" valign="top">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <!-- 操作结点、管理结点信息 的快捷操作栏 begin -->
                    <tbody id="topwin_tool" class="hide">
                        <tr>
                            <td>
                                <iframe id="topwin" name="topwin" onload="settophistory();" height="30" scrolling="no"
                                    frameborder="0" width="100%"></iframe>
                            </td>
                        </tr>
                    </tbody>
                    <!-- 操作结点、管理结点信息 的快捷操作栏 end -->
                    <!-- 主操作页面 begin -->
                    <tbody id="mainwin_tool">
                        <tr>
                            <td valign="top">
                                <iframe id="mainwin" name="mainwin" onload="setmainhistory();" scrolling="auto" frameborder="0"
                                    src="Admin_Main.aspx" width="100%"></iframe>
                            </td>
                        </tr>
                    </tbody>
                    <!-- 主操作页面 end -->
                    <!-- 主操作页面 和 信息frame 的操作条 begin -->
                    <tbody>
                        <tr>
                            <td id="HorizontalSplitBar" style="height: 3px; background-color: #666666; cursor: n-resize;">
                            </td>
                        </tr>
                    </tbody>
                    <!-- 主操作页面 和 信息frame 的操作条 end -->
                    <!-- 操作信息frame begin -->
                    <tbody id="statewin_tool" class="hide">
                        <tr>
                            <td>
                                <iframe id="statewin" name="statewin" scrolling="auto" src="publish/admin_taskInfo.aspx"
                                    width="100%" height="200" frameborder="0"></iframe>
                            </td>
                        </tr>
                    </tbody>
                    <!-- 操作信息frame end -->
                </table>
            </td>
            <!-- main 页面 end -->
        </tr>
    </table>
    <div style="display: none;">
        <iframe id="Anti_refresh" name="Anti_refresh"></iframe>
        <!--系统管理操作子菜单 begin-->
        <div id="sys_admin_menu">
            <table border="0" cellspacing="0" cellpadding="0" class="table_menu_borer">
                <tr onclick="doing('setting_panel');" title="系统管理面板">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        系统管理面板
                    </td>
                </tr>
                <% if (base.m_IAdminUser.CheckUserPermission(TRPOP.CMS.Plugin.PermissionKeys.PermissionEnum.SystemManage_Cache))
                   { %>
                <tr onclick="doing('clear_cache');" title="缓存管理">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        缓存管理
                    </td>
                </tr>
                <%}
                   if (base.m_IAdminUser.CheckUserPermission(TRPOP.CMS.Plugin.PermissionKeys.PermissionEnum.SystemManage_SysParam))
                   { %>
                <tr onclick="doing('setting');" title="系统设置">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        系统设置
                    </td>
                </tr>
                <%}
                   if (base.m_IAdminUser.CheckUserPermission(TRPOP.CMS.Plugin.PermissionKeys.PermissionEnum.SystemManage_User))
                   { %>
                <tr onclick="doing('user_admin');" title="用户管理">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        用户管理
                    </td>
                </tr>
                <%}
                   if (base.m_IAdminUser.CheckUserPermission(TRPOP.CMS.Plugin.PermissionKeys.PermissionEnum.SystemManage_ContentModel))
                   { %>
                <tr onclick="doing('content_model_admin');" title="内容模型管理">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        内容模型管理
                    </td>
                </tr>
                <%}
                   if (base.m_IAdminUser.CheckUserPermission(TRPOP.CMS.Plugin.PermissionKeys.PermissionEnum.SystemManage_PSN))
                   { %>
                <tr onclick="doing('psn_admin');" title="发布点(PSN)管理">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        发布点(PSN)管理
                    </td>
                </tr>
                <%}
                   if (base.m_IAdminUser.CheckUserPermission(TRPOP.CMS.Plugin.PermissionKeys.PermissionEnum.SystemManage_Plugin))
                   { %>
                <tr onclick="doing('plugin_admin');" title="插件管理">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        插件管理
                    </td>
                </tr>
                <%}
                   if (base.m_IAdminUser.CheckUserPermission(TRPOP.CMS.Plugin.PermissionKeys.PermissionEnum.SystemManage_UploadFile))
                   { %>
                <tr onclick="doing('fielddel_admin');" title="附件设置">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        附件设置
                    </td>
                </tr>
                <%}
                   if (base.m_IAdminUser.CheckUserPermission(TRPOP.CMS.Plugin.PermissionKeys.PermissionEnum.SystemManage_TemplateVars))
                   { %>
                <tr onclick="doing('tpl_vars_admin');" title="模板变量管理">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        模板变量管理
                    </td>
                </tr>
                <%}
                   if (base.m_IAdminUser.CheckUserPermission(TRPOP.CMS.Plugin.PermissionKeys.PermissionEnum.SystemManage_KeysReplace))
                   { %>
                <tr onclick="doing('keywords_admin');" title="关键字替换">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        关键字替换
                    </td>
                </tr>
                <%} %>
                <tr onclick="doing('userself_admin');" title="个人信息修改">
                    <td onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''">
                        个人信息修改
                    </td>
                </tr>
            </table>
        </div>
        <!--系统管理操作子菜单 end-->
        <!--插件管理操作子菜单 begin-->
        <div id="plugins_menu">
            <table border="0" cellspacing="0" cellpadding="0" width="160" bgcolor="#F1F1F1" class="table_menu_borer">
                <%string strPlugins_menuTR = "<tr onclick=\"doing('{0}');\" ><td   onmouseover=\"this.className='menu_itemhover'\" onmouseout=\"this.className=''\">{1}</td></tr>";
                  StringBuilder strvPlugins_menuTR = new StringBuilder();
                  foreach (System.Data.DataRow TempRow in TRPOP.CMS.Model.SYSConfig.GetDataSource("Plugin", "//items").Rows)
                  {
                      strvPlugins_menuTR.Append(string.Format(strPlugins_menuTR, new object[] { TempRow["PluginControlAction"], TempRow["PluginName"] }));
                  }
                %>
                <%=strvPlugins_menuTR.ToString()%>
            </table>
        </div>
        <!--插件管理操作子菜单 end-->
        <!--信息查看子菜单 begin-->
        <div id="sysinfo_menu">
            <table border="0" cellspacing="0" cellpadding="0" width="160" bgcolor="#F1F1F1" class="table_menu_borer">
                <tr>
                    <td onclick="doing('state');" onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''"
                        title="查看状态窗口">
                        查看状态窗口
                    </td>
                </tr>
            </table>
        </div>
        <!--信息查看子菜单 end-->
        <!-- 自定义二级菜单 begin-->
        <%
            foreach (System.Data.DataRow TempRow in oTBTopMenu.Rows)
            {
                if (TempRow["undefinable"].ToString().Trim().ToLower() == "true")
                {
        %>
        <div id='<%=TempRow["MenuKey"].ToString()%>'>
            <table border="0" cellspacing="0" cellpadding="0" class="table_menu_borer">
                <% 
                    foreach (System.Data.DataRow TempRow2 in TRPOP.CMS.Model.SYSConfig.GetDataSource(TempRow["MenuKey"].ToString(), "//items").Rows)
                    {
                %>
                <tr>
                    <td onclick="DoingUndefinedMenu('<%=TempRow2["MenuTip"].ToString()%>','<%=TempRow2["MenuAction"].ToString()%>','<%=TempRow2["URL"].ToString()%>');"
                        class="menu_item" onmouseover="this.className='menu_itemhover'" onmouseout="this.className=''"
                        title='<%=TempRow2["Name"].ToString()%>'>
                        <%=TempRow2["Name"].ToString()%>
                    </td>
                </tr>
                <%
                    }
                %>
            </table>
        </div>
        <%
            }
            }
        %>
        <!-- 自定义二级菜单 end-->
    </div>
    <div id="showmenu">
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            var _navigator = navigator_check();
            if (_navigator.maxthon) {//maxthon 
                ShowSysTip("本系统中【结点更新】、【结点发布】操作目前不支持傲游浏览器");
            }
            else if (_navigator.opera) {
                ShowSysTip("本系统中【结点更新】、【结点发布】操作目前不支持 Opera浏览器");
            }
        });
    </script>
</body>
</html>
